package com.dx.download;

/**
 * Created by jwaoo on 2017/7/18.
 */

public class DownloadInfo {
    public String url;
    public String fileDir;
    public String fileName;
    public String key; //G_key  游戏key, V_key 视频key
    public int state = 0;

    public DownloadInfo(String url, String fileDir, String key) {
        this.url = url;
        this.fileDir = fileDir;
        this.key = key;
    }

    public DownloadInfo(String url, String fileDir, String fileName, String key, int state) {
        this.url = url;
        this.fileDir = fileDir;
        this.fileName = fileName;
        this.key = key;
        this.state = state;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getFileDir() {
        return fileDir;
    }

    public void setFileDir(String fileDir) {
        this.fileDir = fileDir;
    }

    public String getFileName() {
        int index = url.lastIndexOf("/");
        return url.substring(index+1);
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }


}
